<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "{{%near_movies}}".
 *
 * @property integer $id
 * @property string $douban_id
 * @property string $douban_url
 * @property string $title
 * @property string $original_title
 * @property string $complaints
 * @property string $subtype
 * @property string $episodes_count
 * @property string $year
 * @property string $small
 * @property string $large
 * @property string $medium
 * @property string $summary
 * @property string $region
 * @property double $rating_score
 * @property string $rating_count
 * @property string $duration
 * @property integer $add_time
 * @property integer $update_time
 * @property integer $release_date
 * @property integer $hot
 * @property integer $push
 * @property integer $weight
 * @property string $index_image
 */
class NearMovies extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%near_movies}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['summary'], 'string'],
            [['rating_score'], 'number'],
            [['add_time', 'update_time', 'release_date', 'hot', 'push', 'weight'], 'integer'],
            [['douban_id', 'subtype', 'duration'], 'string', 'max' => 30],
            [['douban_url', 'title', 'original_title', 'complaints', 'small', 'large', 'medium', 'index_image'], 'string', 'max' => 255],
            [['episodes_count', 'region', 'rating_count'], 'string', 'max' => 20],
            [['year'], 'string', 'max' => 10],
            [['douban_id'], 'unique'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'douban_id' => 'Douban ID',
            'douban_url' => 'Douban Url',
            'title' => 'Title',
            'original_title' => 'Original Title',
            'complaints' => 'Complaints',
            'subtype' => 'Subtype',
            'episodes_count' => 'Episodes Count',
            'year' => 'Year',
            'small' => 'Small',
            'large' => 'Large',
            'medium' => 'Medium',
            'summary' => 'Summary',
            'region' => 'Region',
            'rating_score' => 'Rating Score',
            'rating_count' => 'Rating Count',
            'duration' => 'Duration',
            'add_time' => 'Add Time',
            'update_time' => 'Update Time',
            'release_date' => 'Release Date',
            'hot' => 'Hot',
            'push' => 'Push',
            'weight' => 'Weight',
            'index_image' => 'Index Image',
        ];
    }
}
